import java.util.Scanner;

public class Demo05 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int i = scanner.nextInt();
        System.out.println(i >= 90 ? "A" : i >= 60 ? "B" :"C");
    }
}
